package ast;

import compiler.OutputFormatter;

public enum Type {

    INT("int"), 
    STR("char *"),
    BOOL("int"); // Used internally in the compiler, not in the language

    private String name;

    Type(String name) {
        setName(name);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

	/**
	 * Generates the C source code of the current knot
	 * @param of The OutputFormatter where the code will be generated
	 */    
    public void genC(OutputFormatter of) {
        of.output(getName());
    }
}
